<HTML>
<HEAD>
  <TITLE>个人主页</TITLE>
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
  <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache,must-revalidate">
  <META HTTP-EQUIV="expires" CONTENT="Wed,26 Feb 1997 08:21:57 GMT">
  <META HTTP-EQUIV="expires" CONTENT="0">
</HEAD>
</HTML>
<?php
  header('Content-Type:text/html;charset=utf-8');
  require_once 'class.php';
  PDOc::_connect();
  session_start();
  $id=$_SESSION['id'];
  $username=$_SESSION['username'];
  $email=$_SESSION['email'];
  $adminRank=$_SESSION['adminRank'];
  PDOc::showUserInfo($id,$username,$email,$adminRank);
  PDOc::Button("newPassage.php","撰写文章");
  echo '<br/>';
  PDOc::showMyPassages($id);
  echo '<br/><br/>';
  echo '<a href="viewAllPassages.php"><input type="button" value="查看所有文章"></a>';
  if ($adminRank>=1) {
    echo '<a href="viewAllUsers.php"><input type="button" value="查看所有用户"></a>';
  }
  PDOc::Button("index.php","注销");
?>